﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
using NH = NHibernate.Mapping.Attributes;

namespace SE.Domain.Model
{
    /// <summary>
    /// Widget Entity
    /// </summary>
    [NH.Class]
    [DataContract]
    public class Widget
    {

        /// <summary>
        /// Widget Id
        /// </summary>
        [NH.Id(Name="Id")]
        [NH.Generator(1, Class = "Identity")]
        [DataMember]
        [Required]
        [DataType(DataType.Custom)]
        [Display(Name = "Id")]
        public int Id { get; set; }

        /// <summary>
        /// Widget Category Code
        /// </summary>
        [NH.Property]
        [DataMember]
        [DataType(DataType.Text)]
        [Display(Name = "Code")]
        public string Code { get; set; }

        /// <summary>
        /// Widget Name used in title
        /// </summary>
        [NH.Property]
        [DataMember]
        [Required]
        [DataType(DataType.Text)]
        [Display(Name = "Name")]
        public string Name { get; set; }

        /// <summary>
        /// Widget Owner
        /// </summary>
        [NH.Property]
        [DataMember]
        [Required]
        [DataType(DataType.Custom)]
        [Display(Name = "CreatorId")]
        public string CreatorId { get; set; }


        /// <summary>
        /// Widget Owner
        /// </summary>
        [NH.Property]
        [DataMember]
        [Required]
        [DataType(DataType.DateTime)]
        [Display(Name = "Modified")]
        public string Modified { get; set; }

    }
}
